#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int return_1(int a)
{
	int count = 0;
	while (a)
	{
		if ((a & 1) == 1)
		{
			count++;
		}
		a >>= 1;
	}
	return count;
}

int main()
{
	int a = 0;
	scanf("%d", &a);

	printf("%d", return_1(a));

	return 0;
}